package cn.geminis.warehouse.service.inventory.entity;

import cn.geminis.lowcode.annotation.*;
import jakarta.persistence.Column;
import jakarta.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 容器关系
 */
@Getter
@Setter
@UuidEntity
@QueryFilter
@CrudRepository
@CrudController
public class ContainerInContainer {

    @ManyToOne(optional = false)
    private Container parent;

    @ManyToOne(optional = false)
    @QueryFilterProperty(fieldName = "child.id", propertyName = "childId", propertyType = "String")
    private Container child;

    @Column(nullable = false)
    private LocalDateTime time;

}
